1. Field of the Invention
The invention relates to a flash memory, in particular to a method for handling data updating of a flash memory and related memory cards.
2. Description of the Related Art
A flash memory is a non-volatile memory that can be electrically erased and reprogrammed. Flash memories are primarily used in memory cards and USB flash drives for general storage and transfer of data between computers and other digital products. Flash memory costs far less than EEPROM and therefore has become a dominant memory device. Examples of products applying flash memory include Personal Digital Assistants (PDA) and laptop computers, digital audio players, digital cameras and mobile phones.
A flash memory comprises a large number of blocks, and each block comprises a plurality of pages for storing data. A flash memory is erased by a unit of a block and programmed by a unit of a page, when data of the flash memory is erased, all pages of a block of the memory must be erased together. When data is written to a flash memory, the data, however, can be written to a specific page of a block of the flash memory. In addition, data can only be written to a page where no data is stored or a page which has been erased.
However, each block of the flash memory could only be erased certain times. When the erased times of a block exceed a threshold value, the block can not be written correctly and mistakes may occur while the data is read from the block, it is very important to use the block averagely to service lifetime of the flash memory, however, the conventional erasing and writing ways can not effectively achieve the goal.
Therefore, a more efficient and average way of utilizing the block of the flash memory is required.